#pragma once
#include "light.h"
class CSpotLight :
	public CLight
{
public:
	CSpotLight(void);
	virtual ~CSpotLight(void);

	void Init(const CVector3D& vPosition, const CVector3D& vDirection, DATA_TYPE fAmbient, const CColor4& vColor, DATA_TYPE cutOff, DATA_TYPE exponent);
	virtual CColor4 Shade(const CRay& vRay, const CVector3D& vPoint, const CVector3D& vNormal, const CGeometry& geometry, DATA_TYPE fTransparency) const;

	const CVector3D& GetDirection() const { return m_vDirection; }
	DATA_TYPE GetCutOff() const { return m_fCutOff; }
	DATA_TYPE GetExponent() const { return m_fExponent; }

protected:
	CVector3D m_vDirection;
	DATA_TYPE m_fCutOff;
	DATA_TYPE m_fExponent;

	DATA_TYPE m_fCutOffCosValue;
};

typedef boost::shared_ptr<CSpotLight> CSpotLightPtr;